package com.ef.util;

import org.hibernate.cfg.DefaultComponentSafeNamingStrategy;

public class AppNamingStrategy extends DefaultComponentSafeNamingStrategy {
	protected final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(AppNamingStrategy.class);

	private static final long serialVersionUID = -3755173289179735413L;

	@Override
	public String classToTableName(String className) {
		String tableName = super.classToTableName(className);
		tableName = "EF_" + tableName;
		return tableName;
	}

	@Override
	public String tableName(String tableName) {
//		if (!tableName.startsWith("APP_") && !tableName.startsWith("SYS_")){
//			return "APP_" + super.tableName(tableName);
//		}
		return super.tableName(tableName);
	}
}